package com.pie4cloud.pie.job.biz.config;

import com.pie4cloud.pie.job.biz.thread.ScheduleThread;
import com.pie4cloud.pie.job.biz.thread.SendThread;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

@Component
public class ApplicationRunnerImpl implements ApplicationRunner {
	@Autowired
	private SendThread sendThread;
	@Autowired
	private ScheduleThread scheduleThread;

	@Override
	public void run(ApplicationArguments args) throws Exception {
		sendThread.init();
		scheduleThread.start();
	}
}
